package com.ruoyi.eam.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.eam.service.IRoleService;
import com.ruoyi.eam.service.ISysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sysroles")
public class SysRoleController extends BaseController {

    @Autowired
    private ISysUserRoleService iSysUserRoleService;


    //根据用户编号查找指定用户
    @GetMapping(value = "/{userId}")
    public AjaxResult getSysUserRole(@PathVariable("userId") Long userId)
    {
        return success(iSysUserRoleService.selectSysUserRoleByUserId(userId));
    }


}
